package cn.edu.scau.cmi.linjinyong.fxml.mybatis;

import cn.edu.scau.cmi.linjinyong.mybatis.domain.Teacher;
import javafx.beans.property.SimpleLongProperty;
import javafx.beans.property.SimpleStringProperty;

public class TeacherData {
    private SimpleLongProperty id;
    private SimpleStringProperty name;
    private SimpleStringProperty college;

    public TeacherData(Teacher teacher){
        this.id = new SimpleLongProperty(teacher.getId());
        this.name = new SimpleStringProperty(teacher.getName());
        this.college = new SimpleStringProperty(teacher.getCollege());
    }

    // accessor
    public long getId() {
        return id.get();
    }

    public SimpleLongProperty idProperty() {
        return id;
    }

    public void setId(long id) {
        this.id.set(id);
    }

    public String getName() {
        return name.get();
    }

    public SimpleStringProperty nameProperty() {
        return name;
    }

    public void setName(String name) {
        this.name.set(name);
    }

    public String getCollege() {
        return college.get();
    }

    public SimpleStringProperty collegeProperty() {
        return college;
    }

    public void setCollege(String college) {
        this.college.set(college);
    }
}
